import { AnyAction } from "redux";
import { produce } from 'immer';
export interface InitState {
  breadcrumdList: { [key: string]: any };
  menuModel: string;
}
const initState: InitState = {
    breadcrumdList: {},
    menuModel: "inline",
};
export default (state: InitState = initState, action: AnyAction) =>
    produce(state, drafState=>{
        switch (action.type) {
            case "SETBREADCRUMD":
                drafState.breadcrumdList = action.breadcrumdList;
                break;
            case "SETMODEL":
                drafState.menuModel = action.menuModel;
                break;
            default:
                return drafState;
        }
    });
